package com.shrct.businessprocess.customerservice.impl;

import com.shrct.businessprocess.customerservice.RCProjectReference;
import com.shrct.businessprocess.customerservice.RCProjectReferenceDAO;
import com.shrct.businessprocess.project.RCCustomerContract;
import edu.fudan.mylang.pf.BaseDAOService;
import edu.fudan.mylang.pf.IGenericQuery;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.customerservice.RCProjectReferenceDAO")
public class RCProjectReferenceDAOImpl extends BaseDAOService<RCProjectReference> implements RCProjectReferenceDAO {
  public RCProjectReference findProjectReference4CustomerContract(final RCCustomerContract customerContract) {
    IGenericQuery<RCProjectReference> query=getObjectFactory().createGenericQuery(RCProjectReference.class,"select e from com.shrct.businessprocess.customerservice.impl.RCProjectReferenceImpl as e   where ((e.customerContract) = (:customerContract)) and  e.active = 1      ").setParameter("customerContract",customerContract);
    RCProjectReference _uniqueResult = query.uniqueResult();
    return _uniqueResult;
  }
}
